<?php /*
 * @see eve_squadrons_admin_list()
 * @see template_preprocess_eve_ranks_admin_list(&$summary)
 */ ?>
<ul>
<?php
	print "<li><div class='eve_squadron_section_name'>Senior Officers</div>\n";
	print theme('eve_ranked_member_list', $summary['senior_officers'], TRUE);
	print "</li>";
	print "<li><div class='eve_squadron_section_name'>Squadron Orphans</div><ul>\n";
	foreach ($summary['squadron_orphans'] as $member) {
		print "<li>" . theme('eve_ranked_member', $member) . "</li>\n";
	}
	print "</ul></li>";
	print "<li><div class='eve_squadron_section_name'>Rank Orphans</div><ul>\n";
	foreach ($summary['rank_orphans'] as $member) {
		print "<li>" . theme('eve_ranked_member', $member) . "</li>\n";
	}
	print "</ul></li>";
	foreach ($summary['squadrons'] as $squadron) {
		print "<li class='eve_squadron'><div class='eve_squadron_title'>\n";
		$suffix = "";
		if (($squadron['wiki_url'] != null) && ('' != trim($squadron['wiki_url']))) {
			print "<a href='" . $squadron['wiki_url'] . "'>";
			$suffix = "</a>";
		}
		if (($squadron['image_url'] != null) && ('' != trim($squadron['image_url']))) {
			print "<img src='" . $squadron['image_url'] . "/>";
		}	
		print $squadron['name'];
		if (($squadron['nick'] != null) && ('' != trim($squadron['nick']))) {
			print " <i>(" . $squadron['nick'] . ")</i>";
		}	
		print $suffix;
		print "</div><ul>\n";
		print "<li><div class='eve_squadron_section_name'>Squadron Leaders</div>\n";
		print theme('eve_ranked_member_list', $squadron['leaders'], TRUE);
		print "</li>\n";
		print "<li><div class='eve_squadron_section_name'>Squadron Members</div>\n";
		print theme('eve_ranked_member_list', $squadron['members'], TRUE);
		print "</li></ul>\n</li>\n";
	}
?>
</ul>
